<?php

namespace app\touch_screen\controller;

use app\common\lib\Arr;
use app\common\lib\Show;
use think\response\Json;

class WorkType extends ApiBase
{

    //获取首页排序前N的分类
    public function getIndexMenu(){
        $limit = input("limit", 0, "intval");//需要的数量

        try {
            $data = (new \app\common\business\WorkType())->getParentListByLimit($limit);
        } catch (\Exception $e) {
            return Show::error([], $e->getMessage(), $e->getCode());
        }
        return Show::success($data);
    }
}